@import './skeleton.css';
@import './chat_widget_skeleton.css';

/* Floating chat button, centered using .u-flex-center */
/* Dimensions expressed via spacing tokens */
.c-chat-widget-toggle {
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-elevation-2);
  color: var(--color-white);
  cursor: pointer;
  font-size: 0;
  height: calc(var(--space-9) - var(--space-1));
  line-height: 1; /* vertical alignment handled by u-flex-center */
  padding: 0;
  transition:
    filter var(--duration-normal) var(--easing-standard),
    transform var(--duration-normal) var(--easing-standard),
    box-shadow var(--duration-normal) var(--easing-standard);
  width: calc(var(--space-9) - var(--space-1));
  z-index: 9999;
}
.c-chat-widget-toggle:hover {
  box-shadow: var(--shadow-elevation-3);
  filter: brightness(1.1);
}
.c-chat-widget-toggle:active {
  transform: scale(0.96);
}
.c-chat-widget-toggle:focus-visible {
  box-shadow: var(--shadow-elevation-2), var(--focus-ring);
  outline: none;
}
.c-chat-widget-toggle svg {
  height: calc(var(--space-7) - var(--space-1));
  pointer-events: none;
  width: calc(var(--space-7) - var(--space-1));
}
.c-chat-widget-panel {
  bottom: calc(var(--space-10) + var(--space-2));
  max-height: 80vh;
  /* visual styles moved to utility classes */
  overflow: hidden;
  position: fixed;
  right: var(--space-5);
  width: calc(var(--space-10) * 4.5);
  z-index: 9999;
}

.c-chat-widget-frame-wrapper {
  height: 70vh;
  position: relative;
  width: 100%;
}

.c-chat-widget-iframe {
  border: none;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity var(--duration-normal) var(--easing-standard);
  width: 100%;
  z-index: 0;
}

.c-chat-widget-iframe.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .c-chat-widget-iframe {
    transition: none;
  }
}
